package com.ruoyi.service.impl;

import com.ruoyi.domain.DsVehicleownerinfo;
import com.ruoyi.mapper.DsVehicleownerinfoMapper;
import com.ruoyi.service.IDsVehicleownerinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 车辆充卡Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-24
 */
@Service
public class DsVehicleownerinfoServiceImpl implements IDsVehicleownerinfoService
{
    @Autowired
    private DsVehicleownerinfoMapper dsVehicleownerinfoMapper;

    /**
     * 查询车辆充卡
     * 
     * @param userId 车辆充卡主键
     * @return 车辆充卡
     */
    @Override
    public DsVehicleownerinfo selectDsVehicleownerinfoByUserId(Long userId)
    {
        return dsVehicleownerinfoMapper.selectDsVehicleownerinfoByUserId(userId);
    }

    /**
     * 查询车辆充卡列表
     * 
     * @param dsVehicleownerinfo 车辆充卡
     * @return 车辆充卡
     */
    @Override
    public List<DsVehicleownerinfo> selectDsVehicleownerinfoList(DsVehicleownerinfo dsVehicleownerinfo)
    {
        return dsVehicleownerinfoMapper.selectDsVehicleownerinfoList(dsVehicleownerinfo);
    }

    /**
     * 新增车辆充卡
     * 
     * @param dsVehicleownerinfo 车辆充卡
     * @return 结果
     */
    @Override
    public int insertDsVehicleownerinfo(DsVehicleownerinfo dsVehicleownerinfo)
    {
        return dsVehicleownerinfoMapper.insertDsVehicleownerinfo(dsVehicleownerinfo);
    }

    /**
     * 修改车辆充卡
     * 
     * @param dsVehicleownerinfo 车辆充卡
     * @return 结果
     */
    @Override
    public int updateDsVehicleownerinfo(DsVehicleownerinfo dsVehicleownerinfo)
    {
        return dsVehicleownerinfoMapper.updateDsVehicleownerinfo(dsVehicleownerinfo);
    }

    /**
     * 批量删除车辆充卡
     * 
     * @param userIds 需要删除的车辆充卡主键
     * @return 结果
     */
    @Override
    public int deleteDsVehicleownerinfoByUserIds(Long[] userIds)
    {
        return dsVehicleownerinfoMapper.deleteDsVehicleownerinfoByUserIds(userIds);
    }

    /**
     * 删除车辆充卡信息
     * 
     * @param userId 车辆充卡主键
     * @return 结果
     */
    @Override
    public int deleteDsVehicleownerinfoByUserId(Long userId)
    {
        return dsVehicleownerinfoMapper.deleteDsVehicleownerinfoByUserId(userId);
    }
}
